import axios from 'axios';
const Login = resolve => require(['./views/Login.vue'], resolve);
const Recover = resolve => require(['./views/Recover.vue'], resolve);
import index from './views/index.vue'
import NotFound from './views/404.vue'
const Home = resolve => require(['./views/Home.vue'], resolve);
const CourseHome = resolve => require(['./views/CourseHome.vue'], resolve);


//系统设置
const orgmanage = resolve => require(['./views/system/orgmanage.vue'], resolve);
const usermanage = resolve => require(['./views/system/usermanage.vue'], resolve);
const resetting = resolve => require(['./views/system/resetting.vue'], resolve);


//常用页面
//资源库//视频库
const video = resolve => require(['./views/resource/video.vue'], resolve);
const work = resolve => require(['./views/resource/work.vue'], resolve);

//资源库//题库
const TeachingCase = resolve => require(['./views/resource/TeachingCase.vue'], resolve);

//资源库//教案库
const Draw = resolve => require(['./views/resource/Draw.vue'], resolve);
import Drawadd from './views/resource/Drawadd.vue'
import previewstage from './views/draw/previewstage.vue'
const templet = resolve => require(['./views/resource/templet.vue'], resolve);
//资源库//课程章节
//资源库//图纸库

//资源库
const courseinfo = resolve => require(['./views/course/courseinfo.vue'], resolve);
//课程//课程简介
const courseplan = resolve => require(['./views/course/courseplan.vue'], resolve);
//课程//课程安排
const coursecontent = resolve => require(['./views/course/coursecontent.vue'], resolve);
//课程//课程内容
const coursemember = resolve => require(['./views/course/coursemember.vue'], resolve);
//课程//课程成员
const coursegroup = resolve => require(['./views/course/coursegroup.vue'], resolve);
//课程//课程小组管理
const coursetask = resolve => require(['./views/course/coursetask.vue'], resolve);
const coursetaskstage = resolve => require(['./views/course/coursetaskstage.vue'], resolve);
const taskstage = resolve => require(['./views/course/taskstage.vue'], resolve);
//课程//课程作业批改
const coursestage = resolve => require(['./views/course/coursestage.vue'], resolve);
//课程//课程基础分析主要内容
const courseachievement = resolve => require(['./views/course/courseachievement.vue'], resolve);
//课程//课程成绩
const studentchievement = resolve => require(['./views/course/studentchievement.vue'], resolve);
//课程//学生课程成绩
const coursenotice = resolve => require(['./views/course/coursenotice.vue'], resolve);
//课程//课程通知
const coursestatistics = resolve => require(['./views/course/coursestatistics.vue'], resolve);
//课程//学习统计
const studentstatis = resolve => require(['./views/course/studentstatis.vue'], resolve);
//课程//学生学习统计
import scheduleadd from './views/course/scheduleadd.vue'
//课程//复制课程
import schedulecopy from './views/course/schedulecopy.vue'
import schedulelist from './views/course/schedulelist.vue'
//课程//课程表创建
//课程
import dian from './views/draw/dian.vue'
//典型人物图纸
import fenxi from './views/draw/fenxi.vue'
//案例分析图纸
import lantu from './views/draw/lantu.vue'
//服务蓝图
import shangye from './views/draw/shangye.vue'
//商业模式画布
import yanjiang from './views/draw/yanjiang.vue'
//电梯演讲图纸
import tiyan from './views/draw/tiyan.vue'
//消费者体验流程图
import naotu from './views/draw/naotu.vue'
//思维脑图
const studentschedulelist = resolve => require(['./views/course/studentschedulelist.vue'], resolve);
//学生开课列表
const stuseat = resolve => require(['./views/course/stuseat.vue'], resolve);
//学生排座
const stumylist = resolve => require(['./views/course/stumylist.vue'], resolve);
const stucoursecontent = resolve => require(['./views/course/stucoursecontent.vue'], resolve);
var routes=[
    {
        path: '/index',
        component: index,
        name: '首页',
        meta:{ role:'index'},
        hidden: true
    },
    {
        path: '/recover',
        component: Recover,
        name: '密码找回',
        meta:{ role:'index'},
        hidden: true
    },    
    {
        path: '/login',
        component: Login,
        name: '登录',
        meta:{ role:'index'},
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '资源库',
        iconCls: 'iconfont icon-ziyuanshezhi',
        meta:{ role:'admin,manager,teacher',home:'resource'},
        children: [
            { path: '/video', component: video, name: '视频库',hidden:false},
            { path: '/work', component: work, name: '试题库' ,hidden:false},
            { path: '/Draw', component: Draw, name: '图纸库' ,hidden:false},
            { path: '/TeachingCase', component: TeachingCase, name: '教案库',hidden:false},
            { path: '/Drawadd', component: Drawadd, name: '图纸',hidden:true},
            { path: '/dian', component: dian, name: '典型人物图纸',hidden:true},
            { path: '/fenxi', component: fenxi, name: '案例分析图纸',hidden:true},
            { path: '/lantu', component: lantu, name: '服务蓝图',hidden:true},
			{ path: '/shangye', component: shangye, name: '商业模式画布',hidden:true},
  			{ path: '/yanjiang', component: yanjiang, name: '电梯演讲图纸',hidden:true},
            { path: '/tiyan', component: tiyan, name: '电梯演讲图纸',hidden:true},
            { path: '/naotu', component: naotu, name: '思维脑图',hidden:true},
        ]
    },
    {
        path: '/templet',
        component: Home,
        name: '课程章节管理',
        iconCls: 'iconfont icon-xiaojielianxi',
        meta:{ role:'admin,manager,teacher',home:'resource'},
        children: [
            { path: '/templet', component: templet, name: '课程章节',hidden:false},
        ]
    },    
    {
        path: '/',
        component: Home,
        name: '学生课程',
        iconCls: 'iconfont icon-xuesheng',
        meta:{ role:'student',home:'resource'},
        children: [
            { path: '/coursebegin', component: studentschedulelist, name: '教师开课列表',hidden:false},
			{ path: '/stuseat', component: stuseat, name: '课堂身份划分',hidden:true},
			{ path: '/stumylist', component: stumylist, name: '我的课程列表',hidden:false},
        ]
    },      
    {
        path: '/',
        component: Home,
        name: '教师课程',
        iconCls: 'iconfont icon-jiaoshi',
        meta:{ role:'admin,manager,teacher',home:'resource'},
        children: [
        	{ path: '/schedulelist', component: schedulelist, name: '课程列表',hidden:false},
            { path: '/scheduleadd', component: scheduleadd, name: '创建课程表',hidden:true},
			{ path: '/schedulecopy', component: schedulecopy, name: '复制课程',hidden:true},
        ]
    },     
    {
        path: '/',
        component: Home,
        name: '系统设置',
        iconCls: 'iconfont icon-xitong1',
        meta:{ role:'admin',home:'resource'},
        children: [
            { path: '/orglist', component: orgmanage, name: '机构管理' ,hidden:false},        
            { path: '/user', component: usermanage, name: '用户管理',hidden:false},
        ]
    },   
    {
        path: '/',
        component: Home,
        name: '个人中心',
        meta:{ role:'admin,manager,teacher,student'},
        hidden:true,
        children: [
            { path: '/resetting', component: resetting, name: '重置密码' ,hidden:false},        
        ]
    },       
    {
        path: '/',
        component: Home,
        name: '系统设置',
        iconCls: 'iconfont icon-xitong1',
        meta:{ role:'manager',home:'resource'},
        children: [
            { path: '/user', component: usermanage, name: '用户管理',hidden:false},
        ]
    },    
    {
        path: '/',
        component: CourseHome,
        name: '课程',
        iconCls: '',
        meta:{ role:'admin,manager,teacher',home:'cource'},
        children: [
            { path: '/courseinfo', component: courseinfo,iconCls:'iconfont icon-kechengjianjie',name: '课程简介',hidden:false},
            { path: '/courseplan', component: courseplan,iconCls:'iconfont icon-yuekechenganpai', name: '课程安排',hidden:false},
            { path: '/coursecontent', component:coursecontent,iconCls:'iconfont icon-kechengneirong', name: '课程内容',hidden:false},
            { path: '/coursemember', component: coursemember,iconCls:'iconfont icon-chengyuan', name: '课程成员',hidden:false},
            { path: '/coursegroup', component: coursegroup,iconCls:'iconfont icon-APPicon-tuandui', name: '小组管理',hidden:false},
            { path: '/coursetask', component: coursetask,iconCls:'iconfont icon-jiaoxuezhongxin_zuoyepigai', name: '作业批改',hidden:false},
            { path: '/courseachievement', component: courseachievement,iconCls:'iconfont icon-chengji', name: '课程成绩',hidden:false},
            { path: '/studentchievement', component: studentchievement,iconCls:'iconfont icon-chengji', name: '学生成绩',hidden:true},
            { path: '/coursenotice', component: coursenotice,iconCls:'iconfont icon-tongzhi1', name: '课程通知',hidden:true},
            { path: '/coursestatistics', component: coursestatistics,iconCls:'iconfont icon-tongji', name: '学习统计',hidden:false},
            { path: '/studentstatis', component: studentstatis,iconCls:'iconfont icon-tongji', name: '学习统计',hidden:true},
            { path: '/coursestage', component: coursestage,iconCls:'iconfont icon-kechengjianjie', name: '课程开始内容',hidden:true},
            { path: '/coursetaskstage', component: coursetaskstage,iconCls:'iconfont icon-kechengjianjie', name: '作业批改',hidden:true},
            { path: '/taskstage', component: taskstage,iconCls:'iconfont icon-kechengjianjie', name: '作业批改',hidden:true},
            { path: '/previewstage', component: previewstage,iconCls:'iconfont icon-kechengjianjie', name: '预览',hidden:true},
        ]
    },    
    {
        path: '/',
        component: CourseHome,
        name: '课程',
        iconCls: '',
        meta:{ role:'student',home:'cource'},
        children: [
            { path: '/courseinfo', component: courseinfo,iconCls:'iconfont icon-kechengjianjie',name: '课程简介',hidden:false},
            { path: '/stucoursecontent', component:stucoursecontent,iconCls:'iconfont icon-kechengneirong', name: '课程内容',hidden:false},
            { path: '/courseplan', component: courseplan,iconCls:'iconfont icon-yuekechenganpai', name: '课程安排',hidden:false},
            { path: '/coursegroup', component: coursegroup,iconCls:'iconfont icon-APPicon-tuandui', name: '课程小组',hidden:false},
            { path: '/coursemember', component: coursemember,iconCls:'iconfont icon-chengyuan', name: '课程成员',hidden:false},
            { path: '/studentchievement', component: studentchievement,iconCls:'iconfont icon-chengji', name: '课程成绩',hidden:false},
        ]
    },       
    {
        path: '*',
        hidden: true,
        meta:{ role:'*'},
        redirect: { path: '/404' }
    }
];

export default routes;